Option Public
Option Declare

Sub Initialize
	'邮件触发代理
	'set up error handler
	On Error GoTo catch
	
	'变量定义
	Dim s As New NotesSession'当前进程
	Dim dbCur As NotesDatabase'当前数据库
	Dim doc As NotesDocument'处理的文档
	
	'变量初始化
	Set dbCur = s.CurrentDatabase
	Set doc = s.DocumentContext
	
	GoTo finally
catch:
	'log error
	MsgBox Erl & ":" & Error
	'resume to the final thing
	Resume finally
	
finally:
	'do the final thing
	
End Sub